package com.cloudlinkscm.base.authcenter.assembler;

import com.cloudlinkscm.base.authcenter.model.UserAccount;
import com.cloudlinkscm.base.authcenter.model.dto.UserAccountCreateDto;
import com.cloudlinkscm.loms.framework.core.pojo.SingleAssembler;
import org.springframework.stereotype.Component;

/**
 * @author : tac
 * @date : 28/07/2017
 */
@Component
public class UserCreateDto2UserAccountAssembler implements SingleAssembler<UserAccountCreateDto, UserAccount> {
    @Override
    public UserAccount assemble(UserAccountCreateDto bo) {
        UserAccount account = new UserAccount();
        account.setAccount(bo.getUsername());
        return account;
    }
}
